.class public Lcom/instagram/creation/video/ui/VideoShutterButton;
.super Landroid/widget/ImageView;
.source "VideoShutterButton.java"

# interfaces
.implements Lcom/instagram/creation/video/a/d;
.implements Lcom/instagram/creation/video/c;


# instance fields
.field private a:Lcom/instagram/creation/video/a/e;

.field private b:Lcom/instagram/creation/video/a;


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1
    .parameter "context"
    .parameter "attrs"

    .prologue
    .line 28
    invoke-direct {p0, p1, p2}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 24
    sget-object v0, Lcom/instagram/creation/video/a/e;->d:Lcom/instagram/creation/video/a/e;

    iput-object v0, p0, Lcom/instagram/creation/video/ui/VideoShutterButton;->a:Lcom/instagram/creation/video/a/e;

    .line 29
    return-void
.end method

.method private b()V
    .locals 0

    .prologue
    .line 85
    invoke-direct {p0}, Lcom/instagram/creation/video/ui/VideoShutterButton;->c()V

    .line 86
    invoke-virtual {p0}, Lcom/instagram/creation/video/ui/VideoShutterButton;->requestLayout()V

    .line 87
    return-void
.end method

.method private c()V
    .locals 3

    .prologue
    const/4 v2, 0x1

    const/4 v1, 0x0

    .line 90
    iget-object v0, p0, Lcom/instagram/creation/video/ui/VideoShutterButton;->b:Lcom/instagram/creation/video/a;

    if-nez v0, :cond_1

    .line 91
    sget v0, Lcom/facebook/av;->camera_shoot_buttonbar_button_video_default:I

    invoke-virtual {p0, v0}, Lcom/instagram/creation/video/ui/VideoShutterButton;->setBackgroundResource(I)V

    .line 92
    invoke-virtual {p0, v1}, Lcom/instagram/creation/video/ui/VideoShutterButton;->setEnabled(Z)V

    .line 108
    :cond_0
    :goto_0
    return-void

    .line 93
    :cond_1
    iget-object v0, p0, Lcom/instagram/creation/video/ui/VideoShutterButton;->b:Lcom/instagram/creation/video/a;

    invoke-virtual {v0}, Lcom/instagram/creation/video/a;->p()Z

    move-result v0

    if-eqz v0, :cond_2

    .line 94
    sget v0, Lcom/facebook/av;->camera_shoot_buttonbar_button_video_default:I

    invoke-virtual {p0, v0}, Lcom/instagram/creation/video/ui/VideoShutterButton;->setBackgroundResource(I)V

    .line 95
    invoke-virtual {p0, v1}, Lcom/instagram/creation/video/ui/VideoShutterButton;->setEnabled(Z)V

    goto :goto_0

    .line 96
    :cond_2
    iget-object v0, p0, Lcom/instagram/creation/video/ui/VideoShutterButton;->b:Lcom/instagram/creation/video/a;

    invoke-virtual {v0}, Lcom/instagram/creation/video/a;->m()Z

    move-result v0

    if-eqz v0, :cond_3

    .line 97
    sget v0, Lcom/facebook/av;->camera_shoot_buttonbar_button_video_default:I

    invoke-virtual {p0, v0}, Lcom/instagram/creation/video/ui/VideoShutterButton;->setBackgroundResource(I)V

    .line 98
    invoke-virtual {p0, v1}, Lcom/instagram/creation/video/ui/VideoShutterButton;->setEnabled(Z)V

    goto :goto_0

    .line 99
    :cond_3
    iget-object v0, p0, Lcom/instagram/creation/video/ui/VideoShutterButton;->a:Lcom/instagram/creation/video/a/e;

    sget-object v1, Lcom/instagram/creation/video/a/e;->b:Lcom/instagram/creation/video/a/e;

    if-eq v0, v1, :cond_4

    iget-object v0, p0, Lcom/instagram/creation/video/ui/VideoShutterButton;->a:Lcom/instagram/creation/video/a/e;

    sget-object v1, Lcom/instagram/creation/video/a/e;->a:Lcom/instagram/creation/video/a/e;

    if-ne v0, v1, :cond_5

    .line 101
    :cond_4
    sget v0, Lcom/facebook/av;->camera_shoot_buttonbar_button_video_pressed:I

    invoke-virtual {p0, v0}, Lcom/instagram/creation/video/ui/VideoShutterButton;->setBackgroundResource(I)V

    .line 102
    invoke-virtual {p0, v2}, Lcom/instagram/creation/video/ui/VideoShutterButton;->setEnabled(Z)V

    goto :goto_0

    .line 103
    :cond_5
    iget-object v0, p0, Lcom/instagram/creation/video/ui/VideoShutterButton;->a:Lcom/instagram/creation/video/a/e;

    sget-object v1, Lcom/instagram/creation/video/a/e;->d:Lcom/instagram/creation/video/a/e;

    if-eq v0, v1, :cond_6

    iget-object v0, p0, Lcom/instagram/creation/video/ui/VideoShutterButton;->a:Lcom/instagram/creation/video/a/e;

    sget-object v1, Lcom/instagram/creation/video/a/e;->c:Lcom/instagram/creation/video/a/e;

    if-ne v0, v1, :cond_0

    .line 105
    :cond_6
    sget v0, Lcom/facebook/av;->camera_shoot_buttonbar_button_video_default:I

    invoke-virtual {p0, v0}, Lcom/instagram/creation/video/ui/VideoShutterButton;->setBackgroundResource(I)V

    .line 106
    invoke-virtual {p0, v2}, Lcom/instagram/creation/video/ui/VideoShutterButton;->setEnabled(Z)V

    goto :goto_0
.end method


# virtual methods
.method public a()V
    .locals 0

    .prologue
    .line 81
    invoke-direct {p0}, Lcom/instagram/creation/video/ui/VideoShutterButton;->b()V

    .line 82
    return-void
.end method

.method public a(Lcom/instagram/creation/video/a/e;)V
    .locals 0
    .parameter

    .prologue
    .line 51
    iput-object p1, p0, Lcom/instagram/creation/video/ui/VideoShutterButton;->a:Lcom/instagram/creation/video/a/e;

    .line 52
    invoke-direct {p0}, Lcom/instagram/creation/video/ui/VideoShutterButton;->b()V

    .line 53
    return-void
.end method

.method public a(Lcom/instagram/creation/video/g/a;)V
    .locals 0
    .parameter

    .prologue
    .line 61
    invoke-direct {p0}, Lcom/instagram/creation/video/ui/VideoShutterButton;->b()V

    .line 62
    return-void
.end method

.method public a(Lcom/instagram/creation/video/g/a;Lcom/instagram/creation/video/g/c;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 71
    invoke-direct {p0}, Lcom/instagram/creation/video/ui/VideoShutterButton;->b()V

    .line 72
    return-void
.end method

.method public b(Lcom/instagram/creation/video/g/a;)V
    .locals 0
    .parameter

    .prologue
    .line 66
    invoke-direct {p0}, Lcom/instagram/creation/video/ui/VideoShutterButton;->b()V

    .line 67
    return-void
.end method

.method public c(Lcom/instagram/creation/video/g/a;)V
    .locals 0
    .parameter

    .prologue
    .line 77
    return-void
.end method

.method public isEnabled()Z
    .locals 2

    .prologue
    .line 33
    iget-object v0, p0, Lcom/instagram/creation/video/ui/VideoShutterButton;->a:Lcom/instagram/creation/video/a/e;

    sget-object v1, Lcom/instagram/creation/video/a/e;->b:Lcom/instagram/creation/video/a/e;

    if-eq v0, v1, :cond_0

    iget-object v0, p0, Lcom/instagram/creation/video/ui/VideoShutterButton;->a:Lcom/instagram/creation/video/a/e;

    if-eqz v0, :cond_0

    iget-object v0, p0, Lcom/instagram/creation/video/ui/VideoShutterButton;->b:Lcom/instagram/creation/video/a;

    invoke-virtual {v0}, Lcom/instagram/creation/video/a;->m()Z

    move-result v0

    if-eqz v0, :cond_1

    .line 36
    :cond_0
    const/4 v0, 0x0

    .line 38
    :goto_0
    return v0

    :cond_1
    invoke-super {p0}, Landroid/widget/ImageView;->isEnabled()Z

    move-result v0

    goto :goto_0
.end method

.method public setClipStackManager(Lcom/instagram/creation/video/a;)V
    .locals 0
    .parameter "clipStackManager"

    .prologue
    .line 56
    iput-object p1, p0, Lcom/instagram/creation/video/ui/VideoShutterButton;->b:Lcom/instagram/creation/video/a;

    .line 57
    return-void
.end method

.method public setEnabled(Z)V
    .locals 2
    .parameter "enabled"

    .prologue
    .line 43
    invoke-super {p0, p1}, Landroid/widget/ImageView;->setEnabled(Z)V

    .line 46
    invoke-virtual {p0}, Lcom/instagram/creation/video/ui/VideoShutterButton;->getBackground()Landroid/graphics/drawable/Drawable;

    move-result-object v1

    if-eqz p1, :cond_0

    const/16 v0, 0xff

    :goto_0
    invoke-virtual {v1, v0}, Landroid/graphics/drawable/Drawable;->setAlpha(I)V

    .line 47
    return-void

    .line 46
    :cond_0
    const/16 v0, 0x80

    goto :goto_0
.end method
